package com.feicheng.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.feicheng.entity.PurchaseHeader;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author feng.zhang
 * @since 2022-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class PurchaseHeaderWithUser extends PurchaseHeader {

    //用户名字
    private String userName;

    //客户所属电话号
    private String telephone;

    //采购订单开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDate;

    //采购订单结束时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;
}
